<?php $this->_extends('_layouts/bocib_layout'); ?>

<?php $this->_block('content');?>
<div id="content">
    <h2>头衔</h2>
    <table style="margin-left:95px;">
        <tr>
            <th class="title_id">分类</th>
            <th class="title">头衔</th>
            <th class="edit">更新</th>
            <th class="delete">删除</th>
        </tr>
        <?php foreach(Title::find()->all()->query() as $title) { ?>
        <tr>
            <td><?=$title->title_id;?></td>
            <td><?=$title->title;?></td>
            <td><a href="<?=url('bofaculty/edittitle', array('title_id'=>$title->title_id));?>">更新名称</a></td>
            <td><a href="<?=url('bofaculty/deletetitle', array('title_id'=>$title->title_id));?>">删除</a></td>
        </tr>
        <?php } ?>
    </table>
    <form action="<?=url('bofaculty/addtitle');?>" method="post">
        <div>
            <label for="new_title">添加新头衔</label>
            <input type="text" name="new_title" id="new_title" />
            <input type="submit" value="提交" />
        </div>
    </form>
</div>
<?php $this->_endblock('content');?>